<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>UploadiFive Test</title>
<script src="<?php echo Url::base();?>jquery.min.js" type="text/javascript"></script>
<script src="<?php echo Url::base(); ?>jquery.uploadify.min.js" type="text/javascript"></script>
<link rel="stylesheet" type="text/css" href="<?php echo Url::base(); ?>uploadify.css">
<style type="text/css">
body {
	font: 13px Arial, Helvetica, Sans-serif;
}
</style>
</head>

<body>
	<h1>Uploadify Demo</h1>
	<form>
		<div id="queue"></div>
		<input id="file_upload" name="name" type="file" multiple="true">
	</form>
    <body>
        <h1>Upload your avatar</h1>
        <form id="upload-form" action="<?php echo URL::site('productm/upload') ?>" method="post" enctype="multipart/form-data">
            <p>Choose file:</p>
            <p><input type="file" name="name" id="avatar" /></p>
            <p><input type="submit" name="submit" id="submit" value="Upload" /></p>
        </form>
    </body>
	<script type="text/javascript">
		<?php $timestamp = time();?>
		$(function() {
			$('#file_upload').uploadify({
				'formData'     : {
					'timestamp' : '<?php echo $timestamp;?>',
					'token'     : '<?php echo md5('unique_salt' . $timestamp);?>'
				},
				'swf'      : '<?php echo Url::base(); ?>uploadify.swf',
				'uploader' : '<?php echo Url::base(); ?>index.php/productm/upload',
				'onUploadSuccess':function(file,data,response){
					                     alert(response);
					                 }
			});
		});
	</script>
</body>
</html>